/**
 * Created by Dalyn on 2017/3/16.
 */
import Relay from "react-relay";

export default class orderTree extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { orderTree }`;
    }

    getVariables() {
        return {
            argsInput: {
                orderId: this.props.orderId
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on orderTreePayload {
            orderTree {
                token
                userId
                value
                errorCode
                totalResult
                authorityId
                orderNodes
                id
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on orderTreePayload {
                    orderTree {
                    token
                    userId
                    value
                    errorCode
                    totalResult
                    authorityId
                    orderNodes
                    id
                    }
                }
            `]
        }];
    }

}
